<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>

<head>
	<meta charset="UTF-8">
	<title>商品列表-azhuo商城</title>
	<link rel="shortcut icon" href="${pageContext.request.contextPath}/image/logo/xyz.ico" type="image/x-icon" />
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css">
</head>

<body>

	<!-- ----------------------------------- start head ----------------------------------- -->

	<jsp:include page="/jsps/includes/head.jsp" />

	<!-- ----------------------------------- end head ----------------------------------- -->


	<!-- ----------------------------------- start banner_x ----------------------------------- -->
	<jsp:include page="/jsps/includes/banner_x.jsp" />
	<!-- ----------------------------------- end banner_x ----------------------------------- -->

	<!-- start danpin -->


	<div class="danpin center">

		<div class="biaoti center">${msg}</div>

		<!-- 显示商品的列表 -->
		<div>

			<c:forEach items="${goodsList }" var="goods" varStatus="goodsStartus">
			
				<%-- 每一行的开头  --%>
				<c:if test="${goodsStartus.count % 5 == 1 }">
					<div class="main center">
				</c:if>

						<%-- 每一列 --%>
						<div class="mingxing fl mb20" style="border:2px solid #fff;width:230px;cursor:pointer;"
							onmouseout="this.style.border='2px solid #fff'" onmousemove="this.style.border='2px solid red'">
							<div class="sub_mingxing">
								<a href="${pageContext.request.contextPath}/GoodsServlet?method=loadGoods&gid=${goods.gid}" target="_blank">
									<img src="${pageContext.request.contextPath}/image/goods/${goods.image}" alt="商品图片" />
								</a>
							</div>
							<div class="pinpai">
								<a href="${pageContext.request.contextPath}/GoodsServlet?method=loadGoods&gid=${goods.gid}"
									target="_blank">${goods.gname}</a>
							</div>
							<div class="youhui">${goods.desc}</div>
							<div class="jiage">${goods.price}</div>
						</div>

				<%-- 每一行的结尾  --%>
				<c:if test="${goodsStartus.count % 5 == 0 || goodsStartus.last}">
						<div class="clear"></div>
					</div>
				</c:if>

			</c:forEach>

		</div>
		<div class="clear"></div>
	</div>

	<!-- end danpin -->

	<!-- ----------------------------------- start footer ----------------------------------- -->
	<jsp:include page="/jsps/includes/footer.jsp"/>
	<!-- ----------------------------------- end login ----------------------------------- -->
	
</body>

</html>